<%@ page language="java" import="java.util.*,com.njth.dao.*,com.njth.beans.*" pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> 
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
			
	
%>

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
	<head>
		<title>南京同虹科贸，打造专业卫浴系统,TOTO专卖，TOTO洁具。</title>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<meta http-equiv="Content-Style-Type" content="text/css" />
		<link href="<%=basePath%>com/njth/css/style.css" rel="stylesheet"
			type="text/css" />
		<link href="<%=basePath%>com/njth/css/layout.css" rel="stylesheet"
			type="text/css" />

		<script type="text/javascript">
			window.onload=function(){
				document.location="#head";
			}
  			function pageSub(){
  	
  			var msg="";
  			var name=document.adduser.username.value;
  			var pass1=document.adduser.userpass1.value;
  			var pass2=document.adduser.userpass2.value;
  			if(name==""){
  			msg=msg+"用户名不能为空！";
  			}
  			if(pass1==""){
  			msg=msg+"密码不能为空！";
  			}
  			if(pass1!=pass2){
  			msg=msg+"俩次密码输入不一致，请核实！"
  			}
  			if(msg.length>0){
  			alert(msg);
  			}else{
  			document.adduser.submit();
  			}
  		}
  	</script>

	</head>

	<body id="page7" >
		<div id="main">
			<!-- header -->
			<div id="header">
				<!--Valid flash version 8.0-->
				<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
					codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,24"
					width="980" height="430">
					<param name="movie"
						value="<%=basePath%>com/njth/flash/Header_f8.swf?button=0" />
					<param name="quality" value="high" />
					<param name="menu" value="false" />
					<!--[if !IE]> <-->
					<object data="flash/Header_f8.swf?button=0" width="980"
						height="430" type="application/x-shockwave-flash">
						<param name="quality" value="high" />
						<param name="menu" value="false" />
						<param name="pluginurl"
							value="http://www.macromedia.com/go/getflashplayer" />
						FAIL (the browser should render some flash content, not this).
					</object>
					<!--> <![endif]-->
				</object>
			</div>
			<!-- content -->
			<div id="content">
				<div class="bgd">
					<div class="inner">
						<div class="extra">
							<a href="#"><img alt=""
									src="<%=basePath%>com/njth/images/ing.jpg" /> </a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
							<a href="#"><img alt=""
									src="<%=basePath%>com/njth/images/banner2.jpg" /> </a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
							<a href="#"><img alt=""
									src="<%=basePath%>com/njth/images/banner3.jpg" /> </a>
						</div>
						<div class="article">
							<div class="indent">
								<h2 >
										<a name="head">添加用户</a>
								</h2>
								<form name="adduser" method="post" action="<%=basePath %>servlet/AddUser">
									<c:if test="${requestScope.error ne null}">
										<fieldset style="padding:10px;backgroud:yellow;color:red;">
										<c:out value="${requestScope.error}"></c:out>
									</fieldset>
									</c:if>
									<p style="color:#3399cc">
										请输入用户名:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
										<input type="text" name="username" id="username" value="${requestScope.newUser.userName}"/>
										&nbsp;&nbsp;
									</p>
									<p style="color:#3399cc">
										请输入电子邮件：&nbsp;
										<input type="text" name="email" id="email"  value="${requestScope.newUser.email}"/>
									</p>
									<p style="color:#3399cc">
										请输入密码：
										&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
										<input type="password" name="userpass1" id="userpass1" value=""/>
									</p>
									<p style="color:#3399cc">
										再输入一次：&nbsp;&nbsp;&nbsp;&nbsp;
										&nbsp;&nbsp;&nbsp;
										<input type="password" name="userpass2" id="userpass2"/>
										&nbsp;&nbsp;
									</p>
									<p  style="color:#3399cc;text-align:center;">
										<input type="button" value="提交" onclick="pageSub();"/>
											&nbsp;&nbsp;&nbsp; 
										<input type="reset" value="重填"/>
									</p>
									<p align="right"><a href="<%=basePath %>com/njth/jsp/umanager.jsp">返回</a></p>
								</form>
							</div>
						</div>
					</div>
				</div>
			</div>
			<!-- footer -->
			<div id="footer">
				<div class="fleft">
					NJTOTO &copy; 2009 | All right
					reserved&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
					&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
					&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
					&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
					<a href="<%=basePath%>com/njth/jsp/administrator.jsp">登录</a>&nbsp;|
					<a href="http://mail.njtoto.com">邮箱</a>
				</div>
				<div class="fright">
					<a href="#"><img alt=""
							src="<%=basePath%>com/njth/images/footer_img1.jpg" /> </a><a
						href="#"><img alt=""
							src="<%=basePath%>com/njth/images/footer_img2.jpg" /> </a><a
						href="#"><img alt=""
							src="<%=basePath%>com/njth/images/footer_img3.jpg" /> </a><a
						href="#"><img alt=""
							src="<%=basePath%>com/njth/images/footer_img4.jpg" /> </a>
				</div>
			</div>
		</div>
	</body>
</html>